﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
    

namespace PhanMemQuanLyCuaHangBanDienThoai
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }
        private void btnThoat_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có thật sự muốn thoát chương trình không?", "Xác Định Thông Tin", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                Close();
            }
        }

        

        private void btnDangXuat_Click(object sender, EventArgs e)
        {
            Logon frm = new Logon();
            frm.Show();
            this.Hide();
        }

        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Logon frm = new Logon();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }
        private void frmLoad_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                if (MessageBox.Show("Bạn có chắc muốn thoát không?", this.Text,
                    MessageBoxButtons.OKCancel, MessageBoxIcon.Question,
                    MessageBoxDefaultButton.Button1) != DialogResult.OK)
                {
                    e.Cancel = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Thông báo");
            }
        }

        private void btnThongKe_Click(object sender, EventArgs e)
        {

        }

       

        private void btnThongTin_Click(object sender, EventArgs e)
        {
            MessageBox.Show("CHƯƠNG TRÌNH QUẢN LÝ MUA ĐIỆN THOẠI DI ĐỘNG\nNhóm sinh viên thực hiện:\nPhan Minh Hòa         Email : hoaphanminh93@gmail.com\nNguyễn Văn Long     Email : kukurick1234@gmail.com\n", "Thông tin", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        private void btnQuanTriChuongTrinh_Click(object sender, EventArgs e)
        {
            
        }

        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Tim_Kiem frm = new Tim_Kiem();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }

        private void btnNhaCC_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Nha_Cung_Cap frm = new Nha_Cung_Cap();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }

        private void btnCungCap_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Phieu_Nhap_Hang frm = new Phieu_Nhap_Hang();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }
        private void btnHoaDon_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Hoa_Don frm = new Hoa_Don();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }
        private void btnNhapHang_Click(object sender, EventArgs e)
        {
            
        }

        private void btnBanHang_Click(object sender, EventArgs e)
        {

        }

        private void btnTKHangHoa_Click(object sender, EventArgs e)
        {

        }

        private void Main_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void btnKhachHang_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Khach_Hang frm = new Khach_Hang();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }

        private void btnQuanLyNV_Click(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            Quan_Ly_Nhan_Vien frm = new Quan_Ly_Nhan_Vien();
            frm.TopLevel = false;
            frm.Dock = DockStyle.Left;
            panelMain.Controls.Add(frm);
            frm.Show();
        }
    }
}
